<template>
  <div class="footer" @contextmenu.prevent="">
    <span class="copy">{{ webconfig.copy }} </span>
    <span class="name" @click="personal">{{ webconfig.name }}</span>
    <span> I </span>
    <span class="beian" @click="beian">{{ webconfig.beian }}</span>
  </div>
</template>

<script setup>
import { reactive, onMounted } from 'vue'
const webconfig = reactive({
  copy: '',
  name: '',
  beian: '',
  url: '',
})

onMounted(() => {
  webconfig.copy = COPY
  webconfig.name = NAME
  webconfig.beian = BEIAN
  webconfig.url = BASEURL
})

const beian = () => {
  window.open("https://beian.miit.gov.cn");
};
const personal = () => {
  window.open(webconfig.url);
};
</script>

<style lang="scss" scoped>
.footer {
  @apply fixed bottom-3 left-1/2;
  transform: translateX(-50%);
  animation: fadeIn 1s;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  padding: 3px 5px;
  border-radius: 3px;

  .name,
  .beian {
    transition: all 0.25s;
    @apply hover:text-light-50;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}
</style>
